<template>
  <div class="box">
    <el-form ref="form" label-width="80px">
      <el-form-item label="公司名称">
        <el-input v-model="form.name" disabled />
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="form.companyAddress" disabled />
      </el-form-item>
      <el-form-item label="公司邮箱">
        <el-input v-model="form.mailbox" disabled />
      </el-form-item>
      <el-form-item label="备注">
        <el-input v-model="form.remarks" disabled />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { getCompany } from '@/api/setting'
import { mapGetters } from 'vuex'
export default {

  data() {
    return {
      form: [{
        name: '',
        companyAddress: '',
        mailbox: '',
        remarks: ''
      }]
    }
  },
  computed: {
    ...mapGetters(['companyId'])
  },
  created() {
    // this.getRoleList() // 获取角色列表
    this.getCompany()
  },
  methods: {
    async  getCompany() {
      this.form = await getCompany(this.companyId)
    }
  }

}

</script>

<style scoped>
.box{
  width: 500px;
  margin-top: 50px;
  margin-left: 30px;
}
</style>
